<?php
/**
 * Created by PhpStorm.
 * User: caijianling
 * Date: 2018/8/17
 * Time: 下午1:16
 */

session_start();

require_once './admin-core/session.php';
$session = new Session();
require_once './admin-core/admin-function.php';
$admin_sql = new TOAdminSQL();
$ff = new fileFunctions();

$title = '';

$server_host = $_SERVER['HTTP_HOST'];

$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER["REQUEST_URI"];
$dir_name = dirname($url);
if ($dir_name === 'http://localhost/three-one/admin') $server_host = $server_host . '/three-one/';


if ($_SERVER['PHP_SELF'] !== '/three-one/admin/login.php' &&
    $_SERVER['PHP_SELF'] !== '/three-one/admin/sign-up.php') {
    if (!$session::get('uid')) {
        ?>
        <script>
            alert("请登录！" + '<?= $_SERVER['PHP_SELF'] ?>');
            window.location.href = "./login.php";
        </script>
        <?php
        return;
    }
}

date_default_timezone_set('PRC');
$style = false;
?>

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?= $title ?></title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <script src="assets/js/echarts.min.js"></script>
    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="assets/css/app.css">
    <link rel="stylesheet" href="assets/css/jquery.xctips.css">
    <script src="assets/js/jquery.min.js"></script>
    <script>
    </script>
    <style>
        /*body {*/
            /*display: none;*/
        /*}*/
    </style>
</head>




